package com.sunda.spmsweb.wmscontroller;

import com.sunda.spmscommon.ResponseResult;
import com.sunda.spmswms.service.IChartService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: Johnny Zhao
 * @time: 2021/9/2 16:46
 */
@RestController
@RequestMapping("/chart")
public class ChartsController {

    @Autowired
    IChartService iChartService;

    @RequestMapping("/age")
    @ApiOperation(value = "库龄查找", notes = "库龄查找", httpMethod = "GET")
    public ResponseResult getAge(){
        List<Map<String, Object>> ageObject = iChartService.getAgeObject();
        return ResponseResult.success().add("data",ageObject);
    }
}
